Skip to content

Deprecate get_logical_axis_rule_from_config#4568

Open
NuojCheng wants to merge 1 commit into
mainfrom
chengnuojin-train-eval-mesh
Open

Deprecate get_logical_axis_rule_from_config#4568
NuojCheng wants to merge 1 commit into
mainfrom
chengnuojin-train-eval-mesh

Conversation

@NuojCheng

@NuojCheng NuojCheng commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR deprecates the get_logical_axis_rules_from_config function in sharding.py. In future, we should use utils.sharding.get_logical_axis_rules to grab logical rule in context.

FIXES: b/536927795

Tests

CI test

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@NuojCheng
NuojCheng force-pushed the chengnuojin-train-eval-mesh branch from 61f962b to a316124 Compare July 22, 2026 19:03
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Hi @NuojCheng, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 I'm sorry @NuojCheng, but I was unable to process your request. Please see the logs for more details.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

from maxtext.utils.sharding import create_sharding
from maxtext.utils.sharding import maybe_shard_with_logical
from maxtext.utils.sharding import get_logical_axis_rules_from_config
from maxtext.utils.sharding import get_logical_axis_rules

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do other models need this update?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only models with explicit sharding onboarded have this change. I updated some other files to make sure get_logical_axis_rules are used.

@NuojCheng
NuojCheng force-pushed the chengnuojin-train-eval-mesh branch from 9a2e5c6 to 86cd649 Compare July 23, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants